package com.codemart.service.impl;

import com.codemart.mapper.JobMapper;
import com.codemart.service.JobService;
import com.codemart.vo.JobInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class JobServiceImpl implements JobService {

    @Autowired
    JobMapper jobMapper;

    @Override
    public List<JobInfoVO> getJobList(String search) {
        List<JobInfoVO> list = new ArrayList<>();
        if(!(search==null||"".equals(search))){
            list = jobMapper.getJobList(search);
        }else{
            list = jobMapper.getJobList(null);
        }
        return list;
    }
}
